
<?php if ( $currency->count() ):?>
    <label for="rangeCurrency">Валюта</label>
    <select id="rangeCurrency" name="currency">
        <?php $my_currency = $sf_user->getAttribute( 'currency', sfConfig::get( 'app_default_currency' ) );
        foreach ( $currency as $item ): ?>
            <option value="<?php echo $item ?>"<?php if ( $my_currency == $item->getCurrency() ) echo " selected=\"selected\"" ?>><?php echo $item ?></option>
<?php   endforeach ?>
    </select>

<script type="text/javascript">

    $("#rangeCurrency").change(function () {
        window.location = '<?php echo url_for("@currency?currency=") ?>' + $("#rangeCurrency option:selected").text();
    });

</script>

<?php else: ?>
    <p>Валюта</p>
<?php endif ?>
